import request from "../utils/request"

// 注册用户
export function registerUser(data){
    return request({
        method: "post",
        url: `/api/auth/register`,
        data: data
    })
}

// 登录
export function signIn(data){
    return request({
        method: "post",
        url: `/api/auth/login`,
        data: data
    })
}

// 退出登录
export function logOut(){
    return request({
        method: "post",
        url: `/api/auth/logOut`
    })
}

// 获得用户信息
export function getUserInfo(){
    return request({
        method: "get",
        url: `/api/auth/userInfo`
    })
}

// 获得联系人列表
export function getContacts(){
    return request({
        method: "get",
        url: `/api/auth/contacts`
    })
}


// 修改头像
export function setAvatar(data){
    return request({
        method: "post",
        url: `/api/auth/setAvatar`,
        data: data
    })
}

// 单文件上传
export function uploadSingleFile(option){
    return request({
        method: "post",
        url: `/upload/singleFile`,
        data: option
    })
}

